import { Sequelize } from "sequelize";
export const sequelize = new Sequelize('ooo','root','123456',{
    dialect:'mysql',
    host:'localhost'
})

export const sync = async () =>{
    let { Blog } = await import('../model/Blog.js')
    await sequelize.sync({force:true})
    let arr = [
    {
        title:'1',
        author:'工'
    },
    {
        title:'1',
        author:'工'
    },
    {
        title:'1',
        author:'工'
    },
    {
        title:'1',
        author:'工'
    },
    {
        title:'1',
        author:'工'
    }

    ]
    Blog.bulkCreate(arr)
}
